import request from '@/utils/request'
export function fetchList(params) {
  return request({
    url: 'cmsEmail/mng/list',
    method: 'get',
    params: params
  })
}

export function fetchListEmail(params) {
  return request({
    url: 'cmsEmail/mng/list',
    method: 'get',
    params: params
  })
}

export function userByIds(params) {
  return request({
    url: '/center/getuserByIds',
    method: 'get',
    params: params
  })
}
export function createAdminEmail(data) {
  return request({
    url: '/cmsEmail/saveOrUpdate/json',
    method: 'post',
    data: data
  })
}


export function deleteAdminSysNotice(id) {
  return request({
    url: 'cmsEmail/del/' + id,
    method: 'post',
  })
}
export function deleteEmail(id) {
  return request({
    url: 'cmsEmail/del/' + id,
    method: 'get',
  })
}


export function getAdminSysNotice(id) {
  return request({
    url: '/sys/adminSysNotice/' + id,
    method: 'get',
  })
}

export function getDetail(id) {
  return request({
    url: 'cmsEmail/detail/' + id,
    method: 'get',
  })
}

export function updateAdminSysNotice(id, data) {
  return request({
    url: '/sys/adminSysNotice/update/' + id,
    method: 'post',
    data: data
  })
}


export function updateShowStatus(params) {
  return request({
    url: '/sys/adminSysNotice/update/updateShowStatus',
    method: 'post',
    params: params
  })
}